package Book;

/**
 * Created with IntelliJ IDEA.
 * User: wenxiwen
 * Date: 2022/4/15
 * Time: 10:25
 * Description: No Description
 */
public class Book {
    private String name;//书名
    private String author;//作者
    private String type;//类型
    private int price;//价格
    private boolean fly;//是否借出

    public Book(String name, String author, String type, int price) {
        this.name = name;
        this.author = author;
        this.type = type;
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public boolean isFly() {
        return fly;
    }

    public void setFly(boolean fly) {
        this.fly = fly;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", type='" + type + '\'' +
                ", price=" + price +
                ", 状态：" + ((fly==true)?"已借出":"未借出")+
                '}';
    }
}